<!--
 * @Author: gao_m3
 * @Date: 2021-09-17 08:57:12
 * @LastEditors: wei_jt@ecidi.com
 * @LastEditTime: 2021-12-27 21:40:22
 * @Descripttion: 
-->
<template>
  <div class="drawer-container">
    <div class="upload-container">
      <h3>{{ LANG.LARGE_FILE_FRAGMENT_UPLOAD }}</h3>
      <fks-chunk-upload
        v-model="value"
        @uploadSuccess="uploadSuccess"
        @uploadError="uploadError"
        @uploadCancel="uploadCancel"
        @lineChange="lineChange"
      >
        <template>
          <fks-button icon="fks-icon-upload-line">
            {{ LANG.UPLOAD }}
          </fks-button>
        </template>
      </fks-chunk-upload>
    </div>
    <div class="post-container">
      <h3>{{ LANG.POSI_MULTI_PORTAL }}</h3>
      <fks-post-selector
        url
        width="40%"
        :post-id.sync="postId"
        :post-name.sync="postName"
        placeholder="自定义placeholder"
        :multi-portal="true"
        @getPostMember="member"
      />
      <h3>{{ LANG.POSI_MULTIPLE_SELECTED }}</h3>
      <fks-post-selector
        url
        width="40%"
        :multi-index="[1, 2]"
        :multiple="true"
        :multiple-limit="3"
        :post-id.sync="postIdList"
        :post-name.sync="postNameList"
        placeholder="自定义placeholder"
      />
    </div>
    <div class="post-container">
      <h3>{{ LANG.TIME_ZONE_TEST }}</h3>
      <fks-date-picker
        v-model="time"
        type="datetime"
        value-format="timestamp"
      />
    </div>
  </div>
</template>

<script>
import { getTimestamp } from './api'
// import Mix from '@/mixins/module'
export default {
  name: 'Components',
  // mixins: [Mix],
  data() {
    return {
      value: '',
      postId: '1336875132315418625',
      postName: '前端工程师',
      postIdList: '1336875132315418625',
      postNameList: '前端工程师',
      time: 1634263579000
    }
  },
  watch: {
    postName(val) {},
    time(val) {
      getTimestamp({ date: val }).then((res) => {})
    }
  },
  mounted() {},
  methods: {
    uploadSuccess(file, res) {},
    uploadError(type, file, error) {},
    uploadCancel(file) {},
    lineChange(status) {},
    member(val) {}
  }
}
</script>

<style lang="scss" scoped>
.drawer-container {
  width: 100%;
  min-width: 720px;
  height: 100%;
  overflow-y: auto;
  font-size: 14px;
  background-color: white !important;
}

.upload-container {
  margin: 24px;
}

.post-container {
  margin: 24px;
}
</style>